<template>
  <view class="container">
    <view class="header">
      <text class="title">图书管理系统</text>
    </view>
    <view class="content">
      <view class="welcome">
        <text>欢迎使用图书管理系统</text>
      </view>
    </view>
  </view>
</template>

<script setup>
import { onMounted } from 'vue';
import { useUserStore } from '@/stores/user';

const userStore = useUserStore();

onMounted(async () => {
  try {
    await userStore.getUserInfoAction();
  } catch (error) {
    console.error('获取用户信息失败:', error);
  }
});
</script>

<style lang="scss" scoped>
.container {
  min-height: 100vh;
  background-color: #f5f5f5;
  
  .header {
    padding: 20rpx;
    background-color: #fff;
    border-bottom: 1rpx solid #eee;
    
    .title {
      font-size: 36rpx;
      font-weight: bold;
      color: #333;
    }
  }
  
  .content {
    padding: 40rpx;
    
    .welcome {
      text-align: center;
      font-size: 32rpx;
      color: #666;
    }
  }
}
</style> 